package com.my.service;

import com.my.hystrix.HystrixClientFallback;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * Created by Administrator on 2017/11/9.
 */
@FeignClient(value = "spring-cloud-producer",fallback=HystrixClientFallback.class)
public interface HelloBackgroundService {//extends HelloServiceRemoteApi{
    @RequestMapping(value = "/hello-service-remote/hello1", method = RequestMethod.GET)
    public String hello(@RequestParam("name") String name);

    @RequestMapping(value = "/hello-service-remote/hello2", method = RequestMethod.GET)
    public Map hello(@RequestHeader("name") String name, @RequestHeader("age") Integer age);


    @RequestMapping(value = "/hello-service-remote/hello3", method = RequestMethod.POST)
    public String hello(@RequestBody Map user);
}
